import { http } from '@/utils/http'

// 获得民宿列表
export const getHomestayPage = (data, query) => {
  return http({
    url: `/app-api/countryside/visitor_center/getHomestayPage`,
    method: 'POST',
    data,
    query,
  })
}

// 创建民宿
export const cerateHomestay = (data) => {
  return http({
    url: `/admin-api/countryside/visitorCenter/createHomestay`,
    method: 'POST',
    data,
  })
}
// 编辑民宿
export const updateHomestay = (data) => {
  return http({
    url: `/admin-api/countryside/visitorCenter/updateHomestay`,
    method: 'PUT',
    data,
  })
}
// 删除民宿
export const deleteHomestay = (query) => {
  console.log(query, 'query')
  return http({
    url: '/admin-api/countryside/visitorCenter/delete',
    method: 'DELETE',
    query,
  })
}
// 获得民宿详情
export const getHomestayDetails = (id) => {
  return http({
    url: '/app-api/countryside/visitor_center/getHomestay?id=' + id,
    method: 'GET',
  })
}
